<template>
	<view class="user-info">
		<view class="status-bar"> </view>
		<view class="top-icon">
			<!-- #ifdef APP || H5 -->
			<image src="/static/icon/rider/message.png" class="t-img"/>
			<!-- #endif -->
		</view>
		<view class="user" @tap="goInfo">
			<image :src="riderInfo.avatar" class="avatar" />
			<view class="user-name">
				<view class="name"> {{riderInfo.apply.name}} </view>
				<view class="phone"> {{riderInfo.apply.mobile}} </view>
			</view>
		</view>
		<view class="num">
			<view class="num-item">
				<view class="value"> {{riderInfo.order_num}} </view>
				<view class="label"> 累计配送(份) </view>
			</view>
			<view class="num-item">
				<view class="value"> {{riderInfo.rider_deposit_zong}} </view>
				<view class="label"> 总收入(元) </view>
			</view>
			<view class="num-item">
				<view class="value"> {{riderInfo.good_comment}}% </view>
				<view class="label"> 好评率 </view>
			</view>
		</view>
	</view>
</template>

<script setup>
	const props = defineProps(['riderInfo'])
	const goInfo = () => {
		uni.navigateTo({
			url: `/pages/riderAndShopInfo/riderAndShopInfo?title=骑手&info=${JSON.stringify(props.riderInfo)}`
		})
	}
</script>

<style lang="scss" scoped>
	.user-info {
		height: 167px;
		padding: 18px 13px 10px;
		background: linear-gradient( 180deg, #FFEFED 0%, rgba(255,255,255,0) 94%);
		.status-bar {
			height: var(--status-bar-height);
			width: 100%;
		}
		.top-icon {
			text-align: right;
			.t-img {
				width: 20px;
				height: 20px;
			}
		}
		.user {
			display: flex;
			align-items: center;
			.avatar {
				width: 60px;
				height: 60px;
				border-radius: 50%;
				margin-right: 6px;
			}
			.user-name {
				.name {
					color: #333333;
					font-size: 16px;
					font-weight: 500;
					line-height: 19px;
					margin-bottom: 7px;
				}
				.phone {
					color: #333333;
					font-size: 12px;
					font-weight: 400;
					line-height: 22px;
				}
			}
		}
		.num {
			display: flex;
			margin-top: 20px;
			justify-content: space-between;
			// padding-right: 47px;
			.num-item {
				display: flex;
				flex-direction: column;
				.value {
					color: #3D3D3D;
					font-size: 18px;
					font-weight: 500;
					line-height: 22px;
					margin-bottom: 3px;
				}
				.label {
					color: #666666;
					font-size: 12px;
					font-weight: 400;
					line-height: 22px;
				}
			}
		}
	}
</style>